﻿@model Weibo.Web.Models.MbIndexModel
@{
    var border = "";
    if (Model.OtherUserConfig.IsThemeDIY == 1)
    {
        ThemeDIY diy = Themes.GetThemeDIYByUID(Model.OtherUser.ID);
        border = diy.BorderStyle + "Bg";
    }
    ViewData["curBorder"] = border;
    int relation = Users.GetRelateBetweenUsers(Model.CurUser.ID, Model.OtherUser.ID);
}
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
    ViewBag.Title = Model.OtherUser.NickName + "的微博 XX微博-随时随地分享身边的新鲜事儿";
}
@section  cssInsert{
    <link rel="stylesheet" type="text/css" href="/Content/CSS/miniblog/index.css" />
    <link rel="stylesheet" type="text/css" href="@Model.OthersSkinCss" />
    <link rel="stylesheet" type="text/css" href="/Content/CSS/miniblog/layer.css" />
}
@section  jsInsert{
    <script type="text/javascript">
        var curBorder = "@border";
    </script>
     <script src="/Scripts/DatePicker.js" type="text/javascript"></script>
    <script src="../../Scripts/js/othersProfile.js" type="text/javascript"></script>
}
<div class="MIB_blogbody">
    <div class="MIB_mblogbgr @border">
        <div class="MIB_mblogbgl">
            <div class="mainR MIB_200 MIB_txtar MIB_linkar">
                @RenderPage("~/Views/Shared/_otherInfoNoAvatar.cshtml")
                 @RenderPage("~/Views/Shared/Wedget_OtherInfo.cshtml")
                @RenderPage("~/Views/Shared/Wedget_OtherFan.cshtml")
               @RenderPage("~/Views/Shared/Wedget_OtherFollow.cshtml")
               @RenderPage("~/Views/Shared/Wedget_OtherTopic.cshtml")
                 @RenderPage("~/Views/Shared/Wedget_OtherTags.cshtml")
            </div>
            <div id="profileL" class="mainL MIB_600 MIB_txtal MIB_linkal">
                <div id="profileHead" class="MIB_mbloghead">
                    <div id="profileHeadBg" class="MIB_mbloglist">
                        <div class="other_headpic">
                            <a href="#">
                                <img title="@Model.OtherUser.NickName" src="@Model.OtherUser.BigAvartar"></a></div>
                        <div class="other_info">
                            <div class="name MIB_txtal">
                                <span class="lf">@Model.OtherUser.NickName<a href="http://weibo.com/zt/s?k=9413"></a></span>
                                @{
                                    Follow f = Users.GetFollowByFuid(Model.OtherUser.ID, Model.CurUser.ID);
                                    if (f != null && !string.IsNullOrEmpty(f.Remark))
                                    {
                                        <div style="cursor:pointer;" onclick="App.showEditRemarkBox (this,'@Model.OtherUser.ID');return false;" id="remark_name" class="remarks MIB_txtbl">(@f.Remark)</div>
                                    }
                                    else if (f != null && string.IsNullOrEmpty(f.Remark))
                                    {
                                         <div style="cursor:pointer;" onclick="App.showEditRemarkBox (this,'@Model.OtherUser.ID');return false;" id="remark_name" class="remarks MIB_txtbl">(设置备注)</div>
                                    }
                                }
                            </div>
                            <p>
 @{
     if (string.IsNullOrEmpty(Model.OtherUser.CustomSite))
     {
                  <a href="@(BaseConfigs.GetWebDomain + "/" + Model.OtherUser.ID)">@(BaseConfigs.GetWebDomain + "/" + Model.OtherUser.ID)</a>
     }
     else
     {
                 <a href="@(BaseConfigs.GetWebDomain + "/" + Model.OtherUser.CustomSite)">@(BaseConfigs.GetWebDomain + "/" + Model.OtherUser.CustomSite)</a>
     }
                      }                                </p>
				  <div class="ad MIB_txtbl"><img src="/Content/Image/transparent.gif" class="small_icon @{@(Model.OtherUser.Sex == TypeConfigs.GetSexFemale ? "sicon_female" : "man")}" title="@{@(Model.OtherUser.Sex == TypeConfigs.GetSexFemale ? "女" : "男")}">@{@Types.GetCityTypesFullName(Model.OtherUser.Location);}</div>
                  @{
                      if (string.IsNullOrEmpty(Model.OtherUser.Blog) && Model.OtherUser.BlogVisible == 1)
                      {
                            <p class="blog MIB_txtbl">
                                <a href="@Model.OtherUser.Blog">@Model.OtherUser.Blog</a></p>
                      }
                      if (string.IsNullOrEmpty(Model.OtherUser.Blog) && Model.OtherUser.BlogVisible == 2 && relation == 3)
                      {
                            <p class="blog MIB_txtbl">
                                <a href="@Model.OtherUser.Blog">@Model.OtherUser.Blog</a></p>
                      }
                      }
                            <p class="MIB_txtbl">
                                @{
                                    if (!string.IsNullOrEmpty(Model.OtherUser.Description))
                                    {
                                         @Model.OtherUser.Description
                                    }
                                    else
                                    {
                                        @:TA还没填写个人介绍
                                    }
                                    }
                                </p>
                       <div class="concern">
                       @{
                           if (relation == 1)
                           {
                           <div class="MIB_btn_inter lf">互相关注<span class="MIB_line_sp">|</span><a onclick="cancelFollow(@Model.OtherUser.ID,'@Model.OtherUser.NickName',this);return false;" href="javascript:void(0)" class="MIB_linkbl"><em>取消</em></a></div>
                           }
                           if (relation == 2)
                           {
                               <div class="MIB_btn2 lf">已关注<span class="MIB_line_sp">|</span><a onclick="cancelFollow(@Model.OtherUser.ID,'@Model.OtherUser.NickName',this);return false;" href="javascript:void(0)" class="MIB_linkbl"><em>取消</em></a></div>
                           }
                           if (relation == 3)
                           {
                           <div class="lf"><a class="btn_add" onclick="follow(@Model.OtherUser.ID,'@Model.OtherUser.NickName',this);return false;" href="javascript:void(0)"><img src="/Content/Image/transparent.gif" alt="" title="已关注你" class="ico_addGrn"><em><img src="/Content/Image/transparent.gif" alt="" class="SG_icon add_icoz">&nbsp;加关注</em></a></div>
                           }
                           if (relation == 4)
                           {
                           <div class="lf"><a onclick="follow(@Model.OtherUser.ID,'@Model.OtherUser.NickName',this);return false;" href="javascript:void(0);" class="btn_add"><img class="SG_icon" src="/Content/Image/transparent.gif" title="关注"><em>加关注</em></a></div>
                           }
                       }
                        <div id="more_handle" class="more_handle" style="display:@(relation == 1 || relation == 2 ? "block" : "none")">
						<a onclick="App.confirm('是否把TA拉入黑名单？',function(){App.pullBlackList(@Model.OtherUser.ID,function(o){ App.fullTip(CodeList[o.Code], 1000, window.location.href.replace('#',''), 3);})});return false;" href="javascript:void(0);">拉黑</a>
                        <em id="line" class="MIB_line_l">|</em>
						<a onclick="App.showGroupAssignBox(@Model.OtherUser.ID,'@Model.OtherUser.NickName');return false;" href="javascript:void(0);" id="setgroup">设置分组</a>
						<em class="MIB_line_l">|</em>
						<a onclick="App.showPopMiniBlog('@@@Model.OtherUser.NickName');return false;" href="javascript:void(0);">@@TA</a>
						<em id="line" class="MIB_line_l">|</em>
						<a onclick="App.showMessageBox('@Model.OtherUser.NickName');return false;" href="javascript:void(0);">发私信</a>
                        
                       
					</div>
                     </div>
                        </div>
                    </div>
                </div>
                <div id="profileFeed" class="MIB_mbloglist">
                    <div class="newFilter MIB_txtal newFilterMb0">
                        <div class="nfTagB nfTagOff">
                            <ul>
                                <li class="current"><span>微博</span></li><li><a href="/@Model.OtherUser.ID/Info">TA的资料</a></li>
                            </ul>
                            <div class="clear">
                            </div>
                        </div>
                    </div>
                    <div class="nfBox" style="">
                        <div class="nfBoxSim" id="filter_key_panel" style="display: @(Model.IsAdvanced > 0 ? "none" : "block");">
                            <div id="filter_nav_panel" class="left">
                                @{
                                    var u = Request.Url.AbsolutePath;
                                    u = "#!" + u; 
                                    if (Model.IsHaveMusic != 1 && Model.IsHavePic != 1 && Model.IsHaveVideo != 1 && Model.IsHaveVote != 1 && Model.IsOri != 1)
                                    {
                                    <a title="全部" action="all" href="@u" class="current">全部</a>
                                    }
                                    else
                                    {
                                    <a title="全部" action="all" href="@u">全部</a>
                                    }
                                    if (Model.IsOri == 1)
                                    {
                                    <a title="原创" action="IsOri" href="@(Utils.AddQueryToUrl(u, "IsOri", "1"))" class="current">原创</a>
                                    }
                                    else
                                    {
                                    <a title="原创" action="IsOri" href="@(Utils.AddQueryToUrl(u, "IsOri", "1"))">原创</a>
                                    }
                                    if (Model.IsHavePic == 1)
                                    {
                                    <a title="图片" action="IsHavePic" href="@(Utils.AddQueryToUrl(u, "IsHavePic", "1"))"  class="current">图片</a>
                                    }
                                    else
                                    {
                                    <a title="图片" action="IsHavePic" href="@(Utils.AddQueryToUrl(u, "IsHavePic", "1"))">图片</a>
                                    }
                                    if (Model.IsHaveVideo == 1)
                                    {
                                    <a title="视频" action="IsHaveVideo" href="@(Utils.AddQueryToUrl(u, "IsHaveVideo", "1"))"  class="current">
                                        视频</a>
                                    }
                                    else
                                    {
                                    <a title="视频" action="IsHaveVideo" href="@(Utils.AddQueryToUrl(u, "IsHaveVideo", "1"))">视频</a>
                                    }
                                    if (Model.IsHaveMusic == 1)
                                    {
                                    <a title="音乐" action="IsHaveMusic" href="@(Utils.AddQueryToUrl(u, "IsHaveMusic", "1"))" class="current">音乐</a>
                                    }
                                    else
                                    {
                                    <a title="音乐" action="IsHaveMusic" href="@(Utils.AddQueryToUrl(u, "IsHaveMusic", "1"))">音乐</a>
                                    }
                                    if (Model.IsHaveVote == 1)
                                    {
                                    <a title="投票" action="IsHaveVote" href="@(Utils.AddQueryToUrl(u, "IsHaveVote", "1"))" class="current">投票</a>
                                    }
                                    else
                                    {
                                    <a title="投票" action="IsHaveVote" href="@(Utils.AddQueryToUrl(u, "IsHaveVote", "1"))">投票</a>
                                    }
                                           
                                }
                            </div>
                            <div class="right">
                                <div class="lf searchbg">
                                    <input type="text" class="input" value="@(string.IsNullOrEmpty(Model.Key) ? "搜索TA的话" : Model.Key)" id="filter_mkey_input"
                                                        name="filter_search" style="color: rgb(153, 153, 153);">
                                    <a href="#" class="searcheck" id="filter_mkey_btn">搜索</a><a class="searchadv" href="#"
                                        id="filter_adv_show">高级搜索</a></div>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                    <div style="display: @(Model.IsAdvanced > 0 ? "block" : "none");" id="filter_adv_panel" class="nfAdv">
                        <div class="close">
                            <a id="filter_adv_hide" class="rt" href="#">关闭高级搜索</a></div>
                        <input type="hidden" id="gid" name="gid" value="0">
                        <input type="hidden" id="filter_adv_search" name="filter_adv_search" value="1">
                        <dl class="dll1 clearFix">
                            <dt class="MIB_txtbl">类&nbsp;&nbsp;&nbsp;&nbsp;型：</dt>
                            <dd>
                                <div class="subdl">
                                    <label for="filter_ori">
                                        <input type="checkbox" id="filter_ori" name="filter_ori" value="1" @(Model.IsOri > 0 ? "checked" : "") />原创</label>
                                    <label for="filter_ret">
                                        <input type="checkbox" id="filter_ret" name="filter_ret" value="1"  @(Model.IsRet > 0 ? "checked" : "")>转发</label>
                                </div>
                                <div class="subdl">
                                    <label for="filter_text">
                                        <input type="checkbox" id="filter_text" name="filter_text" value="1"  @(Model.IsHaveLink > 0 ? "checked" : "")>含短链</label>
                                    <label for="filter_pic">
                                        <input type="checkbox" id="filter_pic" name="filter_pic" value="1"  @(Model.IsHavePic > 0 ? "checked" : "")>含图片</label>
                                    <label for="filter_video">
                                        <input type="checkbox" id="filter_video" name="filter_video" value="1"  @(Model.IsHaveVideo > 0 ? "checked" : "")>含视频</label>
                                    <label for="filter_music">
                                        <input type="checkbox" id="filter_music" name="filter_music" value="1" @(Model.IsHaveMusic > 0 ? "checked" : "")>含音乐</label>
                                    <label for="filter_vote">
                                        <input type="checkbox" id="filter_vote" name="filter_vote" value="1"  @(Model.IsHaveVote > 0 ? "checked" : "")>含投票</label>
                                </div>
                            </dd>
                        </dl>
                        <dl class="dll1 dll2 clearFix MIB_linedot2">
                            <dt class="MIB_txtbl">关键字：</dt>
                            <dd>
                                <input type="text" style="color: rgb(153, 153, 153);" name="filter_search" 
                                                        id="filter_adv_input" class="swidth" value="@(string.IsNullOrEmpty(Model.Key) ? "搜索TA的话" : Model.Key)">
                            </dd>
                            <dt class="MIB_txtbl">时&nbsp;&nbsp;&nbsp;&nbsp;间：</dt>
                            <dd>
                                <input type="text" value="@(Model.StartTime != null ? Model.StartTime.Value.ToString("yyyy-MM-dd") : "选择日期")" class="tinp" id="filter_adv_stime" def="选择日期" name="starttime"
                                                        style="color: rgb(153, 153, 153);" readonly="">
                                <span>至</span>
                                <input type="text" value="@(Model.EndTime != null ? Model.EndTime.Value.ToString("yyyy-MM-dd") : DateTime.Now.ToString("yyyy-MM-dd"))" class="tinp" id="filter_adv_etime" def="选择日期"
                                                        name="endtime" style="color: rgb(153, 153, 153);" readonly="">
                            </dd>
                        </dl>
                        <dl class="dll1 dll3 clearFix">
                            <dt>&nbsp;</dt>
                            <dd>
                                <a id="filter_adv_btn" class="btn_normal btnxs" href="#"><em>搜索</em></a></dd>
                        </dl>
                    </div>
                </div>
             
                  <div id="loadMB"  class="feed_lding MIB_txtbl">
                                    <em class="icon_lding"></em>正在加载，请稍候...</div>

                            <div id="loadError"  style="display:none;"  class="feed_lding MIB_txtbl">
                                    <em class="icon_lding"></em>加载失败，<a  href="javascript:ajaxGetMiniBlog(true);">请重试</a>...</div>

                            <div id="loadNoresult" style="display:none;" class="feed_lding MIB_txtbl">
                                    <em class="icon_lding"></em>此人很懒...</div>
                            </div>
            </div>
        </div>
    </div>
</div>